package com.racetrack

class Runner {

    String firstName
    String lastName
    Date dateOfBirth
    String gender
    String address
    String city
    String state
    String zipcode
    String email

    static constraints = {
        firstName(blank: false)
        lastName(blank: false)
        dateOfBirth()
        gender(inList: ["Male", "Female"])
        address()
        city()
        state()
        zipcode()
        email(email: true)

    }

    //static hasMany = []
    // use comma , to add more
    static hasMany = [regs:Registration]
    
    String toString(){
        return "${firstName} ${lastName}, ${email}"
    }

}
